$(()->
	vm=new Vue
		el:'#app'
		data:
			test:'aaaaaaaaaaaaaaaaaaa'
			users:[]
			user:null
			socket:null
		ready:()->
			that=this
			@socket=io.connect '','force new connection':true
			@socket.on 'connect',()->
				console.log 'connected'
				that.socket.on 'login success',(users,user)->
					console.log 'logined'
					that.users=users
					for u in that.users
						if u.id==user.id then that.user=u;break
				that.socket.on 'new user',(user)->
					that.users.push user
				that.socket.on 'user leave',(user)->
					for u,i in that.users
						if u.id==user.id then that.users.splice i;break
				that.socket.on 'position update',(user)->
					for u,i in that.users
						if u.id==user.id then that.users[i].pos=user.pos
			@socket.emit 'login'
		methods:
			moveHandle:(event)->
				@user.pos.x=event.clientX
				@user.pos.y=event.clientY
				@socket.emit 'position change',@user
);